package com.heima.media.controller;

import com.heima.article.api.DfsControllerFeign;
import com.heima.media.service.WmMaterialService;
import com.heima.model.common.dtos.PageRequestDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.pojos.WmMaterial;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author mgw
 * @create 2021/9/28 23:37
 */
@RestController
@RequestMapping("/api/v1/material")
public class MaterialController {
    @Autowired
    private WmMaterialService wmMaterialService;
    @PostMapping("/upload_picture")
    public ResponseResult uploadPicture(@RequestBody WmMaterial material) {
      return wmMaterialService.uploadPicture(material);
    }
    @PostMapping("/list")
    public ResponseResult<WmMaterial> findPicture(@RequestBody Map<String,Integer> paremMap){
      return wmMaterialService.findPicture(paremMap);
    }
}
